<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!-- saved from url=(0022)https://www.myzte.com/ -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <head>
    <title>中兴手机商城-提供中兴官方正品智能手机(中兴天机7、AXON系列、Blade系列、远航系列)、SPRO2智能投影仪、配件等中兴终端产品</title>
    <meta name="keywords" content="ZTE手机,AXON天机7、远航、A910、中兴手机,中兴手机官方商城,中兴官网,中兴AXON7,星星2号,GrandS天机">
    <meta name="description" content="ZTE中兴手机商城是中兴通讯旗下手机等终端产品的电子商务官方网站，提供中兴官方正品智能手机(中兴天机7、AXON系列、Blade系列、远航系列)、SPRO2智能投影仪、配件等中兴终端产品，官方品质保证！">
    <meta property="qc:admins" content="254072226776512456375">
    <meta property="wb:webmaster" content="e7bfc2e53f06554b">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta property="wb:webmaster" content="df14863f24f089b7">
    <script src="/Public/template/js/hm.js"></script><script src="/Public/template/js/hm.js"></script><script src="/Public/template/js/compatible.js"></script>
    <link href="/Public/bootstrap/js/bootstrap.min.css" rel="stylesheet" type="text/css">
    <script src="/Public/template/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Public/template/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Public/template/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>

    <link rel="stylesheet" href="/Public/template/style/theme.css">
    <link rel="stylesheet" href="/Public/template/style/style.css">
    <link rel="stylesheet" href="/Public/template/style/public.css">
    </head>
<body class="index-body">
<!-- 顶部导航 start -->
<header>
    <div class="containers">
        <nav class="navbar navbar-inverse">
            <ul class="nav navbar-nav left-navbar clearfix">
                <li class=""><a href="https://www.myzte.com/zx-campus.html">中兴校园</a></li>
                <li><a href="https://www.myzte.com/help-11.html">帮助中心</a></li>
                <!-- <li><a href="/">活动列表</a></li> -->
                <li><a class="no-border" href="javascript:;">全年无休热线:400-880-9999</a></li>
            </ul>
            <ul class="nav navbar-nav top-tools navbar-right right-navbar">
                <li class="is-login" id="loginInfo">

                </li>
                <!-- <li class=""><a class="no-border" href="http://old.myzte.com">旧版入口</a></li> -->
            </ul>
        </nav>
    </div>
</header>
<script src="/Public/template/js/public.js"></script>
<!-- 顶部导航 end -->
<?php if($_show_nav==1): ?>

<!-- 头部 start -->
<div class="header w1210 bc mt15">
    <div class="search-block">
        <div class="logo">
            <a href="<?php echo U('Index/index');?>"><img src="/Public/template/images/zx-logo.png" alt=""></a>
        </div>
        <div class="shop-cart">
            <a href="<?php echo U('Cart/lst');?>" class="shopcart-logo" id="cart_list">
                <img src="/Public/template/images/shopcart.png" alt="">&nbsp;&nbsp;&nbsp;购物车
                <span class="shopcart-number cart-count hidden" id="count"></span>
            </a>
            <div class="shopcart-null cart-content"  id="cart_div_list" style="display: none;">
                <div class="remind">
                    购物车中还没有商品,快快选购吧!
                    <img src="/Public/template/images/smile.png" alt="">
                </div>
            </div>

        </div>
        <!-- 搜索 -->
        <div class="search">
            <div class="search-icon">
                <div class="input-block">
                    <form  name="search" method="get" class="fl">
                        <input type="text" id="key" name="key" placeholder="搜索您需要的商品">
                    </form>
                </div>
                <div class="button-block">
                    <button type="button" data-action="/list.html?"
                            onclick="location.href='<?php echo U('Search/key_search', '',FALSE); ?>/key/'+$('#key').val();">
                        <img src="/Public/template/images/Search.png" alt="">
                    </button>
                </div>
            </div>
        </div>
    </div>
    <div class="classify-block">
        <div class="classify">
            <ul class="list-unstyled all-goods-type clearfix">
                <li class="pull-left all-categories">
                    <span class="text-left">全部商品分类</span>
                    <img src="/Public/template/images/fenlei_icon.png" alt="" class="pull-right">
                    <ul class="list-unstyled all-categories-detail" style="display: block;">
                        <?php foreach($catData as $k => $v): ?>
                        <li class="fl-hover">
                            <h4>
                                <a href="<?php echo U('Search/cat_search?cat_id='.$v['id'],'',FALSE)?>"><?php echo $v['cate_name']?></a>
                            </h4>
                            <!-- <ul class="list-unstyled clearfix classify-2">
                                 <li class="pull-left fenlei-list-li">
                                     <a href="https://www.myzte.com/list.html?cat_id=2">其他手机</a>
                                 </li>
                                 <li class="pull-right">
                                     <img src="/Public/template/images/cbl_icon.png" alt="">
                                 </li>
                             </ul>-->
                            <div class="more-goods-block clearfix fl-one">
                                <div class="goods-block">
                                    <ul class="list-unstyled clearfix">
                                        <?php foreach($v['children'] as $k1 => $v1):?>
                                        <li class="pull-left goods-deatil-li">
                                            <div class="goods-image">
                                                <?php echo showImage($v1['sm_logo'])?>
                                            </div>
                                            <div class="goods-name">
                                                <a href="<?php echo U('Search/cat_search?cat_id='.$v1['id'],'',FALSE)?>">
                                                    <span><?php echo ($v1["cate_name"]); ?></span>
                                                </a>
                                            </div>
                                        </li>
                                        <?php foreach($v1['children'] as $k2 => $v2):?>
                                        <a href="<?php echo U('Search/cat_search?cat_id='.$v2['id'],'',FALSE)?>"><?php echo $v2['cate_name']?></a>
                                        <?php endforeach?>
                                        <?php endforeach;?>
                                        <!-- <li class="pull-left goods-deatil-li">
                                             <div class="goods-image">
                                                 <img src="/Public/template/images/9b5232e00240.jpg" alt="其他手机">
                                             </div>
                                             <div class="goods-name">
                                                 <a href="<?php echo U('Search/cat_search?cat_id='.$v['id'],'',FALSE)?>">
                                                     <span>其他手机</span>
                                                 </a>
                                             </div>
                                         </li>-->
                                        <!-- <li class="pull-left goods-deatil-li goods-look-all">
                                             <div class="goods-image">
                                                 <a href="https://www.myzte.com/list.html?cat_id=1">查看更多 <img src="/Public/template/images/look-all.png" alt="其他手机"></a>
                                             </div>
                                         </li>-->
                                    </ul>
                                </div>
                                <!-- <div class="recommend-goods hide">
                                     <div class="recommend-goods-block">
                                         <a href="https://www.myzte.com/">
                                             <img src="/Public/template/images/goods1.png" alt="">
                                         </a>
                                     </div>
                                 </div>-->
                            </div>
                        </li>
                        <?php endforeach;?>
                        <textarea id="first" class="hide">
</textarea>
                        <script>
                            $(function(){
                                /**
                                 * 模板填充工具
                                 */
                                var substitute = function(str, obj) {
                                    return str.replace(/\\?\{([^{}]+)\}/g, function(match, name) {
                                        if (match.charAt(0) == '\\') return match.slice(1);
                                        if(name.match(/\./)){
                                            value = eval('obj.'+name);
                                            return value?value:'';
                                        }
                                        return (obj[name] != undefined) ? obj[name] : '';
                                    });
                                };

                                $('.all-categories-detail .fl-hover').each(function(){
                                    var secondcate_len = $(this).find('.goods-deatil-li').length;
                                    if(secondcate_len>=11){
                                        $(this).find('.goods-deatil-li:nth-child(n+10)').hide();
                                        $(this).find('.goods-look-all').show();
                                    }
                                })
                            })
                        </script>
                    </ul>
                </li>

                <!--左边导航栏结束-->
                <li class="pull-left">
                    <a href="<?php echo U('Index/index');?>">首页</a>
                </li><li class="pull-left create-fl">
                <a href="https://www.myzte.com/v8.html">Blade V8</a>
                <s style="position: absolute;top: -10px;line-height: 1.2;"><img src="/Public/template/images/new.png" alt="new"></s>

            </li>

                <li class="pull-left create-fl">
                    <a href="https://www.myzte.com/6902176008580.html">天机7 MAX</a>
                    <s style="position: absolute;top: -10px;line-height: 1.2;"><img src="/Public/template/images/hot.png" alt="hot"></s>

                </li>

                <li class="pull-left create-fl">
                    <a href="https://www.myzte.com/6902176000645.html">天机7</a>
                    <s style="position: absolute;top: -10px;line-height: 1.2;"><img src="/Public/template/images/hot.png" alt="hot"></s>
                </li>

                <li class="pull-left create-fl"><a href="https://www.myzte.com/6902176003141.html">Blade系列</a>
                    <div class="fenlei-detail-block">
                        <div class="fenlei-detail">
                            <ul class="list-unstyled fenlei-two clearfix">
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/6902176003141.html" target="_blank">
                                        <div class="goods-img" style="border-left: none;">
                                            <img src="/Public/template/images/33a4865f7219.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>Blade A2</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span class="new-pri">￥<strong>699.0</strong></span>

                                            </div>
                                        </div>
                                    </a>
                                </li>
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/6902176009532.html" target="_blank">
                                        <div class="goods-img">
                                            <img src="/Public/template/images/243509c98820.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>Blade A2 Plus</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span class="new-pri">￥<strong>899.0</strong></span>

                                            </div>
                                        </div>
                                    </a>
                                </li>
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/v8.html" target="_blank">
                                        <div class="goods-img">
                                            <img src="/Public/template/images/7bb917a907a0.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>Blade V8</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span class="new-pri">￥<strong>1499.0</strong></span>

                                            </div>
                                        </div>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>

                </li>
                <li class="pull-left create-fl" id="cate-jxpj">
                    <a href="https://www.myzte.com/list.html?cat_id=2">ZTE精品系列</a>


                    <div class="fenlei-detail-block">
                        <div class="fenlei-detail" >
                            <ul class="list-unstyled fenlei-two clearfix">
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/6902176002823.html" target="_blank">
                                        <div class="goods-img" style="border-left: none;">
                                            <img src="/Public/template/images/116bc2b6c266.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>V7 MAX(全网通)</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span>￥<strong>1799.0</strong></span>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/6902176002793.html" target="_blank">
                                        <div class="goods-img">
                                            <img src="/Public/template/images/1fbc59cd878f.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>A910</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span>￥<strong>1299.0</strong></span>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/6902176007774.html" target="_blank">
                                        <div class="goods-img">
                                            <img src="/Public/template/images/1fbc59cd878f.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>小鲜4</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span>￥<strong>1090.0</strong></span>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/item-1848.html" target="_blank">
                                        <div class="goods-img">
                                            <img src="/Public/template/images/1fbc59cd878f.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>AXON天机MAX</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span>￥<strong>2799.0</strong></span>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/item-1896.html" target="_blank">
                                        <div class="goods-img">
                                            <img src="/Public/template/images/1fbc59cd878f.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>远航4</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span>￥<strong>799.0</strong></span>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                                <li class="pull-left">
                                    <a href="https://www.myzte.com/6934933090095.html" target="_blank">
                                        <div class="goods-img">
                                            <img src="/Public/template/images/1fbc59cd878f.jpg" alt="">
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                <span>Spro 2 智能微投</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                <span>￥<strong>3699.0</strong></span>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>

                <li class="pull-left crceate-fl"><a href="http://www.myzte.cn/">中兴社区</a></li>
                <li class="pull-right news-li">
                    <div class="news-block clearfix">
                        <div id="newsBox">
                            <ul><li><a href="https://www.myzte.com/p-97.html">【公告】ZTE中兴 Blade V8预约活动开奖！</a></li><li><a href="https://www.myzte.com/p-96.html">春节期间发货时间调整公告</a></li><li><a href="https://www.myzte.com/p-92.html">关于中兴手机商城12月28日系统升级公告</a></li></ul>

                            <ul><li><a href="https://www.myzte.com/p-97.html">【公告】ZTE中兴 Blade V8预约活动开奖！</a></li><li><a href="https://www.myzte.com/p-96.html">春节期间发货时间调整公告</a></li><li><a href="https://www.myzte.com/p-92.html">关于中兴手机商城12月28日系统升级公告</a></li></ul>
                        </div>
                        <div class="news-name"><img src="/Public/template/images/horn.png" alt=""></div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
<script>
    <?php $ic=C('IMAGE_CONFIG');?>
    var picView ="<?php echo $ic['viewPath']?>";
    $("#cart_list").mouseover(function () {
        $.ajax({
            type:'GET',
            url:"<?php echo U('Cart/ajaxCartList')?>",
            dataType:'json',
            success:function (data) {
                var a = 0;
                html ="<ul class='list-unstyled'>";
                $(data).each(function (k,v) {
                    html +='<li class="clearfix shopcart-goods-li" id="cart" value="'+v.goods_id+ '-'+v.goods_attr_id+'"><div style="float: left;" class="shopcart-goods-image">' +
                            '<img width="50" src="'+picView+v.mid_logo+'" /> ' +
                            '</div>';
                    html +='<div style="float: left;" class="shopcart-goods-name">' +
                            '<p>'+ v.goods_name+'</p>' +
                            '</div>';
                    html +='<div style="float: left;margin-left: 20px;" class="shopcart-goods-price">' +
                            '<div style="float: left";> ￥'+v.price+'</div>' +
                            '<div style="float: left";>' +
                        '<a info-data="' + v.goods_id + '-' + v.goods_attr_id + '" onclick="delCart( this )" href="javascript:void(0); ">删除</a>'+
                            '</div></div></li>';
                    a++

                });
                html +="</ul>";
                if(a>0){
                    $('#cart_div_list').html(html);
                }else{
                    $('#cart_div_list').css('display','block');
                }

            }
        });
    });
    //var count =0;
    $(function () {
         /*count = $('.list-unstyled').children.length;
        if(count > 0){
            $('#count').removeClass('hidden').html(count);
        }*/
        $.ajax({
            type:'GET',
            url:"<?php echo U('Cart/ajaxCartList')?>",
            dataType:'json',
            success:function (data) {
                var i = 0;
                $(data).each(function (k,v) {
                    i++;
                });
                if(i>0){
                    $('#count').removeClass('hidden').html(i);
                }
            }
        });
    });
    function delCart( a ){
        var info = $(a).attr('info-data');
        $.ajax({
            type:'GET',
            url:"<?php echo U('Cart/ajaxDelCart');?>",
            data:"id="+info,
            dataType:'json',
            success:function (data) {
                if(data.code==1){
                    $("li[value='+ info +']").remove();
                }
            }
        });
    }
    //购物车数量加载
    var cart_count=null;
    var cart_count_get=false;
    $.get("<?php echo U('Cart/ajaxDelCart')?>")
        .done(function(re){
            if(re.data&&re.data.count>0){
                $('.cart-count').removeClass('hidden').text(re.data.count);
                cart_count=re.data.count;
                $('.shop-cart').find('.shopcart-null').remove();
            }else{
                $('.shop-cart').find('.shopcart-full').remove();
            }
        })
        .fail(function(){
            $('.shop-cart').find('.shopcart-full').remove();
        })
        .always(function(){
            cart_count_get=true;
        })
    //购物车项
    var cart_load_twice=0;
    $('.shop-cart').on('mouseenter',function(e){
        if(cart_count_get){
            if(cart_count){
                if(cart_load_twice===0){
                    cart_load_twice=1;
                    $.ajax({
                        url:'https://www.myzte.com/index.php/openapi/cart/preview',
                        dataType:'json'
                    })
                        .done(function(re){
                            if(re.data && re.data.length){
                                var item_html ='',item_html_tpl = $('#minicart_item_tpl').html();
                                $.each(re.data,function(idx,item){
                                    item_html+=substitute(item_html_tpl,item);
                                });
                                $('.shopcart-full').show().find('ul').html(item_html);
                                $('.shop-cart').find('.shopcart-logo').addClass('active');
                            }
                        });
                }else{
                    $(this).find('.shopcart-logo').addClass('active');
                    $('.cart-content').show();
                }
            }else{
                $(this).find('.shopcart-logo').addClass('active');
                $('.cart-content').show();
            }
        }
    });
    $('.shop-cart').on('mouseleave',function(){
        $('.cart-content').hide();
        $(this).find('.shopcart-logo').removeClass('active');
    });
</script>
<?php endif;?>
<link rel="stylesheet" href="/Public/Home/style/fillin.css" type="text/css">
<script type="text/javascript" src="/Public/Home/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/Public/Home/js/cart2.js"></script>


<div style="clear:both;"></div>

<!-- 页面头部 start -->
<div class="header w990 bc mt15">
    <div class="logo w990">
        <h2 class="fl"><a href="index.html"><img src="images/logo.png" alt="京西商城"></a></h2>
        <div class="flow fr flow2">
            <ul>
                <li>1.我的购物车</li>
                <li class="cur">2.填写核对订单信息</li>
                <li>3.成功提交订单</li>
            </ul>
        </div>
    </div>
</div>
<!-- 页面头部 end -->

<div style="clear:both;"></div>

<!-- 主体部分 start -->
<div class="fillin w990 bc mt15">
    <div class="fillin_hd">
        <h2>填写并核对订单信息</h2>
    </div>

    <div class="fillin_bd">
        <!-- 收货人信息  start-->
        <div class="address">
            <h3>收货人信息 <a href="javascript:;" id="address_modify">[修改]</a></h3>
            <div class="address_info" id="newAddress_info">
                <p><?php echo ($info["consignee"]); ?>  <?php echo ($info["mobile"]); ?> </p>
                <p><?php echo $info['province']['region_name']?> <?php echo $info['city']['region_name']?> <?php echo $info['district']['region_name']?> <?php echo ($info["address"]); ?> </p>
            </div>
            <div class="address_select none">
                <ul id="newLi">
                    <?php foreach($all_info as $k => $v): if($v['is_default']==1){ $checked = 'checked="checked"'; }else{ $checked =""; } ?>
                    <li <?php if($v['is_default'] == 1): ?>class="cur"<?php endif; ?>>
                    <input type="radio" name="address_id" <?php echo ($checked); ?> value="<?php echo ($v["id"]); ?>"/><?php echo ($v["consignee"]); ?>
                    <?php echo $v['province']['region_name']?>
                    <?php echo $v['city']['region_name']?>
                    <?php echo $v['district']['region_name']?> <?php echo ($v["address"]); ?> <?php echo ($v["mobile"]); ?>
                    <a href="javascript:setDefaultAddress(<?php echo ($v["id"]); ?>)">设为默认地址</a>
                    <a href="javascript:editAddress(<?php echo ($v["id"]); ?>)">编辑</a>
                    <a href="javascript:delAddress(<?php echo ($v["id"]); ?>)">删除</a>
                    <?php if($v['is_default'] ==1):?>
                    <span id='check' style="color:red " value="<?php echo ($v["id"]); ?>">[默认]</span>
                    <?php endif; ?>
                    </li>
                    <?php endforeach; ?>
                    <li class="last_li"><input type="radio" name="address_id"  class="new_address" />使用新地址</li>
                </ul>
                <form action="/index.php/Home/Order/add" name="address_form" id="address_form" class="none" method="post">
                    <ul>
                        <li>
                            <label for=""><span>*</span>收 货 人：</label>
                            <input type="text" name="consignee" class="txt" value=""/>
                        </li>
                        <li>
                            <label for=""><span>*</span>所在地区：</label>
                            <select name="province" id="province">
                                <option value="">请选择</option>
                            </select>

                            <select name="city" id="city">
                                <option value="">请选择</option>
                            </select>

                            <select name="district" id="district">
                                <option value="">请选择</option>
                            </select>
                        </li>
                        <li>
                            <label for=""><span>*</span>详细地址：</label>
                            <input type="text" name="address" class="txt address"  />
                        </li>
                        <li>
                            <label for=""><span>*</span>手机号码：</label>
                            <input type="text" name="mobile" class="txt" />
                        </li>
                    </ul>
                    <input type="hidden" name="member_id" value="<?php echo ($info["member_id"]); ?>"/>
                    <input type="hidden" name="id" id="id" value=""/>
                </form>
                <a href="javascript:void(0)" name="submit" id="newAddress" onclick="newAddress()" class="confirm_btn"><span>保存收货人信息</span></a>
            </div>
        </div>
        <!-- 收货人信息  end-->
    <form  method="post" id="delivery_form" name="delivery_form">
        <!-- 配送方式 start -->
        <div class="delivery">
            <h3>送货方式 <a href="javascript:;" id="delivery_modify">[修改]</a></h3>
            <div class="delivery_info">
                <p>普通快递送货上门</p>
                <p>送货时间不限</p>
            </div>

            <div class="delivery_select none">
                <table>
                    <thead>
                    <tr>
                        <th class="col1">送货方式</th>
                        <th class="col2">运费</th>
                        <th class="col3">运费标准</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($shippingData as $k => $v):?>
                    <tr <?php if($k==0):?>class="cur"<?php endif;?>>
                        <td>
                            <input type="radio" name="shipping_id" value="<?php echo $v['shipping_id']?>" title="<?php echo ($v["shipping_name"]); ?>"
                            <?php if($k==0):?>checked<?php endif ?>/><?php echo ($v["shipping_name"]); ?>
                            <?php if($v['config_option']):?>
                            <?php $v['config_option'] = explode('##',$v['config_option']);?>
                            <select name="config_option[<?php echo $v['shipping_id'];?>]" >
                                <?php foreach($v['config_option'] as $k1 => $v1):?>
                                <option value="<?php echo ($v1); ?>"><?php echo ($v1); ?></option>
                                <?php endforeach;?>
                            </select>
                            <?php endif;?>
                        </td>
                        <td><?php echo ($v["insure"]); ?></td>
                        <td><?php echo ($v["shipping_desc"]); ?></td>
                    </tr>
                    <?php endforeach;?>
                    </tbody>
                </table>
                <a href="javascript:;" class="confirm_btn"><span>确认送货方式</span></a>
            </div>
        </div>
        <!-- 配送方式 end -->
</form>
        <!-- 支付方式  start-->
        <!--
        <div class="pay">
            <h3>支付方式 <a href="javascript:;" id="pay_modify">[修改]</a></h3>
            <div class="pay_info">
                <p>货到付款</p>
            </div>

            <div class="pay_select none">
                <table>
                    <tr class="cur">
                        <td class="col1"><input type="radio" name="pay" />货到付款</td>
                        <td class="col2">送货上门后再收款，支持现金、POS机刷卡、支票支付</td>
                    </tr>
                    <tr>
                        <td class="col1"><input type="radio" name="pay" />在线支付</td>
                        <td class="col2">即时到帐，支持绝大数银行借记卡及部分银行信用卡</td>
                    </tr>
                    <tr>
                        <td class="col1"><input type="radio" name="pay" />上门自提</td>
                        <td class="col2">自提时付款，支持现金、POS刷卡、支票支付</td>
                    </tr>
                    <tr>
                        <td class="col1"><input type="radio" name="pay" />邮局汇款</td>
                        <td class="col2">通过快钱平台收款 汇款后1-3个工作日到账</td>
                    </tr>
                </table>
                <a href="" class="confirm_btn"><span>确认支付方式</span></a>
            </div>
        </div>
          -->
        <!-- 支付方式  end-->

        <!-- 发票信息 start-->
        <form method="post" id="invoice_form" name="invoice_form">
        <div class="receipt">
            <h3>发票信息 <a href="javascript:;" id="receipt_modify">[修改]</a></h3>
            <div class="receipt_info">
                <p>个人发票</p>
                <p>内容：明细</p>
            </div>

            <div class="receipt_select none">
                    <ul>
                        <li>
                            <label for="">发票抬头：</label>
                            <input type="radio" name="inv_payee" value="personal" title="个人发票" checked="checked" class="personal" />个人
                            <input type="radio" name="inv_payee" value="company" title="单位" class="company"/>单位
                            <input type="text" name="company_name" class="txt company_input" disabled="disabled" />
                        </li>
                        <li>
                            <label for="">发票内容：</label>
                            <?php foreach($inv_config as $k => $v):?>
                            <input type="radio" name="inv_content" value="<?php echo ($v); ?>" <?php if($k==0):?>checked="checked" <?php endif;?> /><?php echo ($v); ?>
                            <?php endforeach;?>
                        </li>
                    </ul>

                <a href="javascript:" class="confirm_btn"><span>确认发票信息</span></a>
            </div>
        </div>
            </form>
        <!-- 发票信息 end-->
        <!-- 商品清单 start -->
        <div class="goods">
            <h3>商品清单</h3>
            <table>
                <thead>
                <tr>
                    <th class="col1">商品</th>
                    <th class="col2">规格</th>
                    <th class="col3">价格</th>
                    <th class="col4">数量</th>
                    <th class="col5">小计</th>
                </tr>
                </thead>
                <tbody>
                <?php $tp=0; $gcount=0; foreach ($data as $k => $v):?>
                <tr>
                    <td class="col1"><a href=""><?php echo showImage($v['mid_logo'])?></a>  <strong><a href="<?php echo U('Index/goods?id=' .$v['goods_id'])?>"><?php echo ($v["goods_name"]); ?></a></strong></td>
                    <td class="col2">
                        <?php foreach($v['gaData'] as $k1 => $v1): ?>
                        <p><?php echo ($v1["attr_name"]); ?></p> <p><?php echo ($v1["attr_value"]); ?></p>
                        <?php endforeach?>
                    </td>
                    <td class="col3"><?php echo ($v["price"]); ?></td>
                    <td class="col4"><?php
 echo $v['goods_number']; $gcount += $v['goods_number']; ?></td>
                    <td class="col5"><span><?php $xj = $v['price']* $v['goods_number'];$tp+=$xj;echo $xj;?></span></td>
                </tr>
                <?php endforeach ?>
                </tbody>
                <tfoot>
                <tr>
                    <td colspan="5">
                        <ul>
                            <li>
                                <span>共 <?php echo ($gcount); ?>件商品，总商品金额：</span>
                                <em id="insure0"><?php echo ($tp); ?></em>
                            </li>
                            <!--
                            <li>
                                <span>返现：</span>
                                <em>-￥240.00</em>
                            </li>
                        -->
                            <li>
                                <span>运费：</span>
                                <em id="insure">10</em>
                            </li>
                            <li>
                                <span>应付总额：</span>
                                <em id="insure1"><?php echo ($tp+10); ?></em>
                            </li>
                        </ul>
                    </td>
                </tr>
                </tfoot>
            </table>
        </div>
        <!-- 商品清单 end -->

    </div>

    <div class="fillin_ft">
        <a href="/index.php/Home/Order/add" id="add_order"><span>提交订单</span></a>
        <p>应付总额：<strong id="insure2">￥<?php echo ($tp+10); ?>元</strong></p>

    </div>
</div>
<!-- 主体部分 end -->
<script>
    //订单提交
    $("#add_order").click(function () {
        //取得要提交页面的url
        var action = $(this).attr('href');
        //创建form
        var form = $('<form></form>');
        //设置属性
        form.attr('action',action);
        form.attr('method','post');
        //form的target属性决定form在哪个页面提交
        //_self ->当前页面_blank ->新页面
        form.attr('target','_self');
        //创建 input
        var addressInput = $('<input type="hidden" name="address_id"/>');
        addressInput.attr('value',$("input[name='address_id']:checked").val());
        form.append(addressInput);

        var shipping_id = $("input[name='shipping_id']:checked").val();
        var shippingInput = $('<input type="hidden" name="shipping_id">');
        shippingInput.attr('value',shipping_id);
        form.append(shippingInput);

        var configOptionInput  = $('<input type="hidden" name="config_optin['+shipping_id+']"/>');
        configOptionInput.attr('value',$("select[name='config_option["+shipping_id+"]']:selected").val());
        form.append(configOptionInput);

        var invPayeeInput = $('<input type="hidden" name="inv_payee"/>');
        invPayeeInput.attr('value',$("select[name='inv_payee']:checked").val());
        form.append(invPayeeInput);

        var companyNameInput = $('<input type="hidden" name="company_name"/>');
        companyNameInput.attr('value',$("input[name='company_name']").val());
        form.append(companyNameInput);

        var invContentInput  = $('<input type="hidden" name="inv_content">');
        invContentInput.attr('value',$("input[name='inv_content']:checked").val());
        form.append(invContentInput);
        //提交表单
        $(document.body).append(form);
        form.submit();
        return false;
        <!--
     form.append(my_input);
    form.append($('#address_form').html());
    form.append($('#delivery_form').html());
    form.append($('#invoice_form').html());
     -->
    });
    $('.last_li').click(function () {
        $('#address_form')[0].reset();
        $("#address_form input[name='id']").val( '' );
        $('#province').val('');
        $('#city,#district').empty().append(new Option('请选择'));
        $('input[name="address_id"][checked]').attr("checked",false).parent().removeClass('cur');
        $(function () {
            $.ajax({
                url:'<?php echo U("UserAddress/region")?>',
                type:'get',
                dataType:'json',
                success:function (data) {
                    $.each(data,function (k,v) {
                        $('#province').append("<option value='"+v.region_id+"'>"+v.region_name+"</option>");
                    });
                }
            });

            $("#province,#city").change(function () {
                var select = $(this);
                $.ajax({
                    url:'<?php echo U("UserAddress/region")?>',
                    type:'get',
                    data:'id='+select.val(),
                    dataType:'json',
                    success:function (data) {
                        select.nextAll('select').empty().append(new Option('请选择'));
                        $.each(data,function (k,v) {
                            select.next().append(new Option(v.region_name,v.region_id));
                        });
                    }
                });
            });
        });
    });
    function showAddress(){
        $("#address_modify").show();
        $(".address_select").hide();
        var address_id = $(".cur input").val();
        $.ajax({
            url:'<?php echo U("UserAddress/lst");?>',
            type:'get',
            data:'id='+address_id,
            dataType:'json',
            success:function (data){
                var html = "<p>"+data.consignee+' '+data.mobile+"</p>";
                html += "<p>"+data.province.region_name +' '+ data.city.region_name +' '+ data.district.region_name +' '+ data.address +"</p>";
                $(".address_info").show().html(html);
            }
        });
    }
    function newAddress() {

        if($('#address_form').css('display')=='none'){
            showAddress();
        }else{
            var params = $('#address_form').serializeArray();
            var values = {};
            for(var item in params){
                values[params[item].name] = params[item].value;
            }
            $.ajax({
                url:values['id']==''? "<?php echo U('UserAddress/add');?>" :"<?php echo U('UserAddress/edit');?>",
                type:"post",
                data:$("#address_form").serialize(),
                dataType:"json",
                success:function (data) {
                    if( data.status != 0 ){
                        var html ="";
                        if(values['id'] != ''){
                            var html = '<input type="radio" checked name="address_id" value="'+ data.id +'"/>'+data.consignee+' '+data.province.region_name+' '+data.city.region_name+' '+data.district.region_name+' '+data.address+' '+data.mobile+
                                    '<a href="javascript:setDefaultAddress('+data.id+')">设为默认地址</a> <a href="javascript:editAddress('+data.id+')">编辑</a> <a href="javascript:delAddress('+data.id+')">删除</a>';
                            $("input[name='address_id'][value='"+data.id+"']").parent().html(html);
                            $('#address_form').hide();
                            showAddress();
                        }else{
                            var html = '<li><input type="radio" name="address_id" value="'+data.id+'"/>'+data.consignee+' '+data.province.region_name+' '+data.city.region_name+' '+data.district.region_name+' '+data.address+' '+data.mobile+
                                    '<a href="javascript:setDefaultAddress('+data.id+')">设为默认地址</a> <a href="javascript:editAddress('+data.id+')">编辑</a> <a href="javascript:delAddress('+data.id+')">删除</a> </li>';
                            //$("#newLi").children('li.last_li').prev('li').after(html);
                            $("#newLi").children('li.last_li').before(html);
                        }
                        $(".new_address").click(function(){
                            /*****************/
                            $("form[name=address_form]").show();
                            $(this).parent().addClass("cur").siblings().removeClass("cur");

                        }).parent().siblings().find("input").click(function(){
                            $("form[name=address_form]").hide();
                            $(this).parent().addClass("cur").siblings().removeClass("cur");
                        });

                    }else{
                        alert( data.info );
                    }
                    /*****************/
                }
            });
        }

    }

    function setDefaultAddress(address_id) {
        $.ajax({
            url:'<?php echo U("UserAddress/setDefault");?>',
            type:'get',
            data:'id='+address_id,
            dataType:'json',
            success:function (data) {
                if(data.status==1){
                    $('input[name="address_id"][checked]').attr("checked",false).parent().removeClass('cur');
                    $("input[name='address_id'][value='"+address_id+"']").attr("checked",true).parent().addClass('cur');
                    window.location.reload();
                }
            }
        })
    }
    function delAddress(address_id) {
        $.ajax({
            url:'<?php echo U("UserAddress/delete");?>',
            type:'get',
            data:'id='+address_id,
            dataType:'json',
            success:function (data) {
                if(data.status == 1){
                    $("input[name='address_id'][value='"+address_id+"']").parent().remove();
                }else{
                    alert(data.info);
                }
            }
        })
    }

    function editAddress(address_id) {
        $('input[name="address_id"][checked]').attr("checked",false);
        $( '#newLi li' ).removeClass( 'cur' );
        $("input[name='address_id'][value='"+address_id+"']").attr("checked",true).parent().addClass('cur');
        $.ajax({
            url:'<?php echo U("UserAddress/edit");?>',
            type:'get',
            data:'id='+address_id,
            dataType:'json',
            success:function (data) {
                $("#address_form").attr('style','display:block');
                $("input[name='id']").val(data.id);
                $("input[name='consignee']").val(data.consignee);
                $("input[name='address']").val(data.address);
                $("input[name='mobile']").val(data.mobile);
                var region = {province:data.province,city:data.city,district:data.district};
                $.each(region,function (region_name,region_id){
                    if(region_name == 'province'){
                        parent_region_id =1;
                    }else if(region_name=='city'){
                        parent_region_id =region.province;
                    }else if(region_name=='district'){
                        parent_region_id = region.city;
                    }
                    $.ajax({
                        url:'<?php echo U("UserAddress/region")?>',
                        type:'get',
                        data:'id='+parent_region_id,
                        dataType:'json',
                        success:function (data) {
                            $.each(data,function (k,v) {
                                $('#'+region_name).append(new Option(v.region_name,v.region_id,(region_id==v.region_id ? true : false),
                                        (region_id==v.region_id ? true:false)));

                            });
                        }
                    });
                });

            }
        });
        $('input[name=address_id]').live('click',function () {
            $(this).parent().addClass('cur').sibling().removeClass('cur')
        });
    }

    //确认收货方式按钮
    $('.delivery_select > .confirm_btn').click(function () {
        var shipping = $("input[name='shipping_id']:checked");
        var delivery_info = $(this).parent().parent().children('.delivery_info');
        $(this).parent().hide();
        $(this).parent().parent().children('h3').find('a').show();
        var title1 = shipping.attr('title');
        var title2 = $("select[name='config_option["+shipping.val()+"]']").children('option:selected').text();
        delivery_info.show().children('p').eq(0).text(title1).parent().children('p').eq(1).text(title2);
    });
    //确认发票信息按钮
    $('.receipt_select > .confirm_btn').click(function () {
        $(this).parent().hide();
        $(this).parent().parent().children('h3').find('a').show();
        var inv_payee = $("input[name='inv_payee']:checked");
        var receipt_info = $(this).parent().parent().children('.receipt_info');
        var inv_payee_val = inv_payee.val();
        var inv_payee_title = inv_payee.attr('title');
        var inv_content = $("input[name='inv_content']:checked").val();
        var company_name = $("input[name='company_name']").val();
        if(inv_payee_val == 'company'){
            inv_payee_title += ':'+company_name;
        }
        receipt_info.show().children('p').eq(0).text(inv_payee_title).parent().children('p').eq(1).text('内容:'+inv_content);
    });


    $("input[name=shipping_id]").click(function(){
        $(this).parent().parent().addClass("cur").siblings().removeClass("cur");
        var insure = $('.cur').children('td').eq(1).text();
        $('#insure').text(insure);
        $('#insure1').text($('#insure0').text() * 1 + insure *1);
        $('#insure2').text($('#insure0').text() * 1 + insure *1)
    });

</script>
<div class="footer">
    <div class="footer-inner">
        <div class="footer-top">
            <ul class="list-unstyled clearfix">
                <li class="pull-left">
                    <img src="/Public/template/images/7.png" alt="">
                    <span>7天退货保障</span>
                </li>
                <li class="pull-left">
                    <img src="/Public/template/images/30.png" alt="">
                    <span>15天换货承诺</span>
                </li>
                <li class="pull-left">
                    <img src="/Public/template/images/mian.png" alt="">
                    <span>150元起全场免运费</span>
                </li>
                <li class="pull-left">
                    <img src="/Public/template/images/position.png" alt="">
                    <span>全国售后服务点</span>
                </li>
            </ul>
        </div>
        <div class="footer-center">
            <div class="footer-plus">
                <div class="help-center">
                    <ul class="list-unstyled clearfix"><li class="help-title"><a href="javascript:;">关注我们</a></li><li class="help-list"><ul><li><a href="https://www.myzte.com/help-14.html">中兴社区</a></li><li><a href="https://www.myzte.com/help-13.html">官方微信</a></li><li><a href="https://www.myzte.com/help-12.html">新浪微博</a></li></ul></li></ul>
                    <ul class="list-unstyled clearfix"><li class="help-title"><a href="javascript:;">帮助中心</a></li><li class="help-list"><ul><li><a href="https://www.myzte.com/help-11.html">支付方式</a></li><li><a href="https://www.myzte.com/help-10.html">购物指南</a></li><li><a href="https://www.myzte.com/help-9.html">配送指南</a></li></ul></li></ul>
                    <ul class="list-unstyled clearfix"><li class="help-title"><a href="javascript:;">售后服务</a></li><li class="help-list"><ul><li><a href="https://www.myzte.com/help-8.html">退换货流程</a></li><li><a href="https://www.myzte.com/help-7.html">售后网点</a></li><li><a href="https://www.myzte.com/help-6.html">退换货政策</a></li><li><a href="https://www.myzte.com/help-5.html">保修政策</a></li></ul></li></ul>
                    <ul class="list-unstyled clearfix"><li class="help-title"><a href="javascript:;">关于商城</a></li><li class="help-list"><ul><li><a href="https://www.myzte.com/help-4.html">联系我们</a></li><li><a href="https://www.myzte.com/help-3.html">商城简介</a></li><li><a href="https://www.myzte.com/help-2.html">礼品团购</a></li></ul></li></ul>
                </div>
                <div class="call-block">
                    <div class="tell">
                        <div class="tell-number">400-880-9999</div>
                        <div class="explain">周一到周日 8:30 - 20:30 (全年无休)</div>
                    </div>
                    <div class="kefu">
                        <img src="/Public/template/images/kefu.png" alt="">
                        <a href="http://v1.live800.com/live800/chatClient/chatbox.jsp?companyID=437521&amp;configID=41175&amp;jid=9108176411" target="_Blank">在线客服</a>

                    </div>
                </div>
            </div>
        </div>
        <div class="footer-bottom">
            <ul class="list-unstyled clearfix">
                <li><a href="http://www.myzte.cn/" target="_blank">中兴社区</a></li>
                <li><a href="http://www.zte.com.cn/" target="_blank">中兴通讯</a></li>
                <li><a href="http://apps.ztems.com/" target="_blank">汇天地</a></li>
                <li><a href="http://cloud.ztedevices.com/zcloud/index.html" target="_blank">中兴云服务</a></li>
                <li><a href="http://www.ztedevice.com.cn/" target="_blank">中兴手机</a></li>
            </ul>
            <div class="copy-right" style="text-align: center;">
                <a href="https://www.myzte.com/help-20.html" target="_blank">服务协议</a> | ©2014 - 2017 深圳市中兴智谷科技有限公司版权所有，并保留所有权利
            </div>
            <div class="copy-right" style="text-align: center;">
                增值电信业务经营许可证：粤B2-20160352 | ICP备案证书号 : <a href="http://www.miitbeian.gov.cn/" target="_blank">粤ICP备16018970号 </a>
            </div>
        </div>
    </div>
</div>
</body></html>
<script>
    $.ajax({
        type:'GET',
        url: "<?php echo U('Member/ajaxChkLogin');?>",
        dataType:'json',
        success:function (data) {
            if(data.login ==1){
                var li ='欢迎您,'+ data.username + '<a href="<?php echo U('Member/logout');?>">退出</a>';
                    li += '<li class=""><a href="<?php echo U('My/order');?>">我的订单</a></li>';
                $('#loginInfo').html(li);
            }else{
                var li ='您好,欢迎来到中兴!<a href="<?php echo U('Member/login');?>">登录</a> <a href="<?php echo U('Member/regist') ?>">免费注册</a>';
                    li += '<li class=""><a href="<?php echo U('My/order');?>">我的订单</a></li>';
                $('#loginInfo').html(li);
            }
        }
    })
</script>